//logs.js
var util = require('../../utils/util.js')
var app = getApp()
Page({
  data: {
    motto: 'Hello World',
    userInfo: {}
  },
  // publish课程
  create: function () {
    wx.navigateTo({
      url: '../../pages/publish/publish'
    })
  },
  //事件处理函数
  bindViewTap: function () {
    wx.navigateTo({
      url: ''
    })
  },
  onLoad: function () {
    console.log('onLoad')
    var that = this
    //调用应用实例的方法获取全局数据
    app.getUserInfo(function (userInfo) {
      //更新数据
      that.setData({
        userInfo: userInfo
      })
    })
  },
  navtopreorder: function () {
    wx.navigateTo({
      url: '../../pages/preorder/preorder',
    })
  },
  navtoclass: function () {
    wx.navigateTo({
      url: '../../pages/class/class',
    })
  },
  // 选择完模板跳转
  complate:function(){
    app.globalData.switchtomy = true
    wx.switchTab({  
      url: '../../pages/my/my',
    })
  }
})